/**
 *--------------------------------------------------------------------\n
 *          HSLU T&A Hochschule Luzern Technik+Architektur            \n
 *--------------------------------------------------------------------\n
 * 
 * \brief         Bibliothek der Fonts
 * \file      	  GFont.h
 * \author        Colucci Domenico, domenico.colucci@stud.hslu.ch
 * \date          29.11.2012
 * 
 *     Settings    :
 *
 *     Contents    :
 *
 *		   GetFontChar           - PGFONT_CharInfo GFONT1_GetFontChar(byte ch);
**         GetBoxHeight          - byte GFONT1_GetBoxHeight(void);
**         GetFont               - PGFONT_Callbacks GFONT1_GetFont(void);
**         GetUnderlineBoxHeight - byte GFONT1_GetUnderlineBoxHeight(void);
**         GetLineSpaceHeight    - byte GFONT1_GetLineSpaceHeight(void);
 * 
 * \b Language:   Ansi-C \n\n
 * \b Target:     Medusa-Trainer \n 
 *
 *--------------------------------------------------------------------
 */

#ifndef __GFONT1_H
#define __GFONT1_H

#include "platform.h"

extern const byte GFONT1_FBBy; /* defines the size of the bounding box */


#ifndef __BWUserType_PConstByte
#define __BWUserType_PConstByte
  typedef const byte *PConstByte;      /* Pointer to a constant byte. */
#endif
#ifndef __BWUserType_GFONT_CharInfo
#define __BWUserType_GFONT_CharInfo
  typedef struct {                     /* A descriptor describing the font. */
    signed char dwidth;                /* position of next char. relative to the current */
    byte width;                        /* width of character in pixels */
    byte height;                       /* height of character in pixels */
    signed char offsetX;               /* horizontal offset to left edge of bounding box */
    signed char offsetY;               /* vertical offset to bottom edge of bounding box */
    PConstByte CharBMP;                /* pointer to character bitmap defined above */
  } GFONT_CharInfo;
#endif
#ifndef __BWUserType_PGFONT_CharInfo
#define __BWUserType_PGFONT_CharInfo
  typedef GFONT_CharInfo* PGFONT_CharInfo ; /* A pointer to GFONT_CharInfo */
#endif
#ifndef __BWUserType_CallbackGetFontChar
#define __BWUserType_CallbackGetFontChar
  typedef PGFONT_CharInfo (*CallbackGetFontChar)(byte ch); /* Callback used to get the font information for a single character. */
#endif
#ifndef __BWUserType_GFONT_Callbacks
#define __BWUserType_GFONT_Callbacks
  typedef struct {                     /* Structure with font relevant callbacks. */
    CallbackGetFontChar GetFontChar;   /* Callback for retrieving a font character. */
    byte boundingBoxHeight;            /* Height of the bounding box. This includes the height of the underline box height. */
    byte underlineBoxHeight;           /* Height of the underline box height. */
    byte lineSpaceBoxHeight;           /* Height of the space between lines */
  } GFONT_Callbacks;
#endif
#ifndef __BWUserType_PGFONT_Callbacks
#define __BWUserType_PGFONT_Callbacks
  typedef GFONT_Callbacks* PGFONT_Callbacks ; /* Pointer to struct for font callbacks. */
#endif



PGFONT_CharInfo GFONT1_GetFontChar(byte ch);
PGFONT_Callbacks GFONT1_GetFont(void);

#define GFONT1_GetBoxHeight() \
  GFONT1_FBBy

#define GFONT1_GetLineSpaceHeight() \
  2

#define GFONT1_GetUnderlineBoxHeight() \
  2


/* END GFONT1. */

#endif

